home *** CD-ROM | disk | FTP | other *** search
/ Software of the Month Club 1999 November / SOTMC_Nov1999-Ultimate.iso / mac / REALbasic ƒ / Examples / Techniques / Examples by Thomas Tempelmann / TT's HideMenubar-Plugin / Source Code (CW Pro 3) / Some Libs & Stubs / MenusLib Stub.c < prev    next >
Encoding:
C/C++ Source or Header  |  1999-05-06  |  745 b   |  23 lines  |  [TEXT/CWIE]

  1. /*
  2.  * PPC Code Resource that provides access to OS 8.5's MenusLib functions
  3.  *
  4.  * By Thomas Tempelmann, rb@tempel.org
  5.  */
  6.  
  7. #include "MenusLib Stub.h"
  8.  
  9. #include <MixedMode.h>
  10. #include <Menus.h>
  11.  
  12. // this line is required by the linker:
  13. ProcInfoType __procinfo = MenusStubInitProcInfo;
  14.  
  15. void main (MenusLibFuncs *funcs)
  16. {
  17.     funcs->showMenuBar = (VoidProc)NewRoutineDescriptor ((ProcPtr)ShowMenuBar, kPascalStackBased, GetCurrentArchitecture());
  18.     funcs->hideMenuBar = (VoidProc)NewRoutineDescriptor ((ProcPtr)HideMenuBar, kPascalStackBased, GetCurrentArchitecture());
  19.     funcs->isMenuBarVisible = (BoolProc)NewRoutineDescriptor ((ProcPtr)IsMenuBarVisible, kPascalStackBased|RESULT_SIZE(SIZE_CODE(sizeof(Boolean))), GetCurrentArchitecture());
  20. }
  21.  
  22. // EOF
  23.